<template>
  <el-dialog
    title="测试弹窗"
    :visible.sync="dialogVisible"
    width="98%">
    <span>
      <el-input rows="20" v-model="content" type="textarea" placeholder="placeholder"></el-input>
    </span>
    <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
  </el-dialog>

</template>

<script>
export default {
  name: 'DemoDialog',
  data:function () {
    return {
      dialogVisible:false,
      content:'',
    }
  },
  mounted () {
    let $this=this
    $this.bus.$on('DemoDialogCallBus',function (content) {
      $this.open(content)
    })
  },
  methods:{
    open:function (content) {
      this.dialogVisible=true
      this.content=content?content:''
    }
  }
}
</script>

<style scoped>

</style>
